package com.sam4cloud.oauth2.project.model.dto;

import com.sam4cloud.common.core.enums.DelFlagEnum;
import com.sam4cloud.common.core.enums.StatusEnum;
import com.sam4cloud.common.core.model.supers.Convert;
import com.sam4cloud.oauth2.project.enums.FreezeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * <p>
 * 认证账户表
 * </p>
 *
 * @author Sam
 * @since 2022-12-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "OauthAccountDTO对象", description = "认证账户表入参")
public class OauthAccountDTO extends Convert {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "账户名称")
    @NotBlank(groups = Add.class, message = "账户名称不能为空")
    private String name;

    @ApiModelProperty(value = "企业id")
    private String appId;

    @ApiModelProperty(value = "企业密钥")
    private String appSecret;

    @ApiModelProperty("认证凭证")
    private String accessToken;

    @ApiModelProperty("过期时间")
    private Long expiresIn;

    @ApiModelProperty("授信域名(,号分割)")
    private String creditDomain;

    @ApiModelProperty("冻结状态 0-正常 1-冻结")
    private FreezeEnum isFreeze;

    @ApiModelProperty(value = "状态 0-有效 1-无效")
    private StatusEnum status;

    @ApiModelProperty(value = "删除标识 0-正常 1-删除")
    private DelFlagEnum delFlag;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    public interface Add {

    }


}
